package com.atguigu.edupublisher.mapper;

import com.atguigu.edupublisher.beans.TradeProvinceOrderCt;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.math.BigDecimal;
import java.util.List;

//@Mapper
public interface TradeStatsMapper {
    @Select("select sum(order_amount) order_amount from dws_trade_province_order_window where toYYYYMMDD(stt) = #{date}")
    BigDecimal selectGMV(@Param(value = "date") Integer date);

    @Select("select province_name,sum(order_amount) from dws_trade_province_order_window where toYYYYMMDD(stt)=#{date} group by province_name")
    List<TradeProvinceOrderCt> selectpramount(Integer date);
}
